//
//  UIFont_skylow.swift
//  SkylowAPP
//
//  Created by 青色石头 on 2024/9/21.
//

import Foundation

extension UIFont {
    static func regular(_ fontSize:CGFloat) -> UIFont {
        UIFont.systemFont(ofSize: fontSize, weight: .regular)
    }

    static func medium(_ fontSize:CGFloat) -> UIFont {
        UIFont.systemFont(ofSize: fontSize, weight: .medium)
    }

    static func semibold(_ fontSize:CGFloat) -> UIFont {
        UIFont.systemFont(ofSize: fontSize, weight: .semibold)
    }

    static func font(_ fontSize:CGFloat, fontName:String) -> UIFont? {
        UIFont(name: fontName, size: fontSize)
    }
    
    
    static func slfont_regular(_ fontSize:CGFloat) -> UIFont {
        UIFont.font(fontSize, fontName: "Inter-Regular")!
    }

    static func slfont_medium(_ fontSize:CGFloat) -> UIFont {
        UIFont.font(fontSize, fontName: "Inter-Medium")!
    }

    static func slfont_semibold(_ fontSize:CGFloat) -> UIFont {
        UIFont.font(fontSize, fontName: "Inter-SemiBold")!
    }
    static func slfont_bold(_ fontSize:CGFloat) -> UIFont {
        UIFont.font(fontSize, fontName: "Inter-Bold")!
    }

    static func slfont_light(_ fontSize:CGFloat, fontName:String) -> UIFont? {
        UIFont.font(fontSize, fontName: "Inter-Light")!
    }
}
